﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hlavny.modul2
{
    public partial class ChangeColumnLengthForm : Form
    {
        private CAttribute attribute;

        public ChangeColumnLengthForm(CAttribute attribute)
        {
            this.attribute = attribute;
            InitializeComponent();
        }

        private void buttonChangeType_Click(object sender, EventArgs e)
        {
            int length = 0;
            try
            {
                length = Int32.Parse(textBoxChangeLength.Text);
            }
            catch (Exception)
            {

                length = 0;
            }
            CDBS.SysColumns.SetLength(attribute, length);
            this.DialogResult = DialogResult.OK;
        }
    }
}
